const mongoose = require("mongoose");

module.exports = () => {
  // 连接数据库
  mongoose
    .connect("mongodb://localhost:27017/MyKoaCil")
    .then(() => {
      console.log("MongoDB connected successfully.");
    })
    .catch((err) => {
      console.error("MongoDB connection error:", err);
    });
};
